package com.landimc.sms.controller;

import cn.hutool.cache.impl.TimedCache;
import com.landimc.sms.entity.Logs;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author Yang
 * @version 1.0
 * @date 2020/10/26 16:37
 */
@Controller
@RequestMapping("/logs")
public class LogsController {

    @Autowired
    private TimedCache<String, Logs> timedCache;

    @GetMapping("/init")
    public String init(Model model) {
        model.addAttribute("logs", timedCache);
        System.out.println(timedCache);
        return "index";
    }
}
